<?php
class CMS_Models_Lang extends Zend_Db_Table_Abstract
{
	protected $_name = "lang";	
	
	public function __construct( )
  	{
	  parent::__construct(array('table' => $this->_name));
  	}
	
	public function getAll()
	{
      return $this->fetchAll();
	}
	
	public function getEnabledLangs()
	{
      return $this->fetchAll("enabled = 1");
	}
	
	public function getLangById($id)
	{
      return $this->fetchRow("id = '$id' ");
	} 

	public function getLangByKey($key)
	{
	  return $this->fetchAll("prefix2 = '$key' ");
	} 

}
?>